# 4.  封装一个类，实现对字典的浅拷贝，深拷贝，和普通的赋值操作。
import copy


class Dict:
    @staticmethod
    def dict_copy():
        # 定义字典
        dict1 = {'name': '郑先生', 'sex': '男', 'num': [1, 2]}
        dict2 = copy.copy(dict1)
        print(dict2)

    @staticmethod
    def dict_deepcopy():
        dict1 = {'name': '郑先生', 'sex': '男', 'num': [1, 2]}
        dict2 = copy.deepcopy(dict1)
        print(dict2)

    @staticmethod
    def dict_info():
        dict1 = {'name': '郑先生', 'sex': '男', 'num': [1, 2]}
        dict2 = dict1
        print(dict2)

# 调用
d1 = Dict()
d1.dict_copy()
d1.dict_deepcopy()
d1.dict_info()
